package com.kaoqin.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaoqin.mapper.UserMapper;
import com.kaoqin.model.User;
import com.kaoqin.service.UserService;

@Service("userService")
@Transactional
//此处不再进行创建SqlSession和提交事务，都已交由spring去管理了。
public class UserServiceImpl implements UserService {
	@Resource
	private UserMapper mapper;

	public User findByIp(User user) {
		return mapper.findByIp(user);
	}
	@Override
	public String findIpAddress() {
		return mapper.findIpAddress();
	}
}
